﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dukou.Caching;

namespace Dukou.Web.Caching
{
    /// <summary>
    /// 基于 ASP.Net Cache 的缓存服务实现
    /// </summary>
    public class AspNetCacheService : ICacheService
    {
        #region ICacheService 成员

        /// <summary>
        /// 获取指定名称的分类缓存
        /// </summary>
        /// <typeparam name="TKey"></typeparam>
        /// <typeparam name="TValue"></typeparam>
        /// <param name="categoryName"></param>
        /// <returns></returns>
        public ICategoryCache<TKey, TValue> GetCategoryCache<TKey, TValue>(string categoryName)
        {
            return new AspNetCategoryCache<TKey, TValue>(categoryName);
        }

        #endregion
    }
}
